#include "record.h"

Record::Record(const AData& data_p, Gl::TicksTime time_p, const AData* parent_p) :
        data(data_p),
        time(time_p),
        parent(static_cast<Record*>(parent_p->id())),
        type(NONE),
        children(),
        prev(NULL),
        next(NULL)
{
}

Record::~Record(){
    delete data;
    if (!parent) parent->children.removeAll(this);
    foreach(Record * r, children) r->parent = 0;
}

